<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/common.jspf" %>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>test</title>

</head>
<!-- 
标签：
声明控件：class="easyui-控件名"，例如：class="easyui-dialog"
控件属性：data-options="属性名:'属性值',属性名:'属性值'"，例如：data-options="iconCls:'icon-save',resizable:true
控件事件：data-options="属性名:'属性值',事件名:function(){}"，
Js:
声明控件：$(选择器).控件名({
  属性名：属性值，
   属性名：属性值，
  事件名：function(){},
   事件名：function(){}
});

如何调用控件已有的方法：
 $(选择器).控件名("方法名", "方法参数");
 $(选择器).控件名("方法名", {参数名：参数值，参数名：参数值 });
 -->
	<script type="text/javascript">

		$(function() {

            $('#dg').datagrid({
                url:'${proPath}/employee/selectPage.action',
                columns:[[
                    {checkbox: true},
                    {field:'usercode',title:'登录账号(工号)',width:100},
                    {field:'employeeName',title:'姓名',width:100},
                    {field:'employeeDept',title:'部门类型',width:100,
                        formatter: function(value,row,index){
                            var array = '${applicationScope.sysParamMap.employee_dept}';
                            return valueToText(array,value);
                        }},
                    {field:'employeeCompany',title:'总公司',width:100,
                        formatter: function(value,row,index){
                            var array = '${applicationScope.sysParamMap.employee_company}';
                            return valueToText(array,value);
                        }},
                    {field:'employeeShop',title:'店铺名称',width:100,
                        formatter: function(value,row,index){
                            var array = '${applicationScope.sysParamMap.employee_shop}';
                            return valueToText(array,value);
                        }},
                    {field:'employeeJob',title:'职务',width:100,
                        formatter: function(value,row,index){
                            var array = '${applicationScope.sysParamMap.employee_job}';
                            return valueToText(array,value);
                        }},
                    {field:'employeeLock',title:'锁定',width:100,
                        formatter: function(value,row,index){
                            var array = '${applicationScope.sysParamMap.employee_lock}';
                            return valueToText(array,value);
                        }},
                    {field:'employeeStatus',title:'角色',width:100,
                        formatter: function(value,row,index){
                            var array = '${applicationScope.sysParamMap.employee_status}';
                            return valueToText(array,value);
                        }},
                    {field:'employeeIdnum',title:'身份证号',width:100},
                    {field:'employeePhone',title:'手机',width:100},
                    {field:'employeeFire',title:'工作状态',width:100,
                        formatter: function(value,row,index){
                            var array = '${applicationScope.sysParamMap.employee_fire}';
                            return valueToText(array,value);
                        }}
                ]],
                toolbar: [{
                    iconCls: 'icon-save',
                    text:'添加',
                    handler: function(){
                        parent.$('#win').window({
                            width:600,
                            height:300,
                            title:'添加用户',
                            modal:true,
                            content:"<iframe src='${proPath}/base/goURL.action?url=home/empadd' title='添加用户' height='100%' width='100%' frameborder='0px'/>"
 						});
                    }
                },'-',{
                    iconCls: 'icon-edit',
                    text:'修改',
                    handler:function(){
                        var row = $('#dg').datagrid("getSelected");
                        if(null==row){
                            alert("请选择需要修改的员工");
                            return ;
                        }
                        parent.$('#win').window({
                            width:600,
                            height:300,
                            title:'修改员工',
                            modal:true,
                            content:"<iframe src='${proPath}/base/goURL.action?url=home/empupdate' title='修改员工' height='100%' width='100%' frameborder='0px'/>"
                        });
                    }
                }],
                fitColumns:true,
                singleSelect:true,
                striped:true,
                rownumbers:true,
                pagination:true,
                pageSize:3,
                pageList:[3,6,9,12,15],
            });
		});
        function search() {
			$('#dg').datagrid('load', {
			 employeeCompany: $('#ecompany') .combobox("getValue"),
			 employeeShop: $('#eshop').combobox("getValue"),
			 employeeStatus: $('#estatus').combobox("getValue"),
			 employeeName: $('#ename').val(),
			 employeeId: $('#eid').val(),
			 employeeIdnum: $('#enum').val(),
			 employeePhone: $('#ephone').val(),
			 });
        }
	</script>
<body>
	<!-- 右键菜单定义如下： -->
	<form id="ff" >
		总公司:
		<select class="easyui-combobox" id="ecompany" name="employeeCompany" />
		<c:forEach items="${applicationScope.sysParamMap.employee_company}" var="sp">
			<option value="${sp.key}">${sp.value}</option>
		</c:forEach>
		</select>
		店铺名称:
		<select id="eshop" class="easyui-combobox" id="eshop" name="employeeShop" style="width:110px;">
			<c:forEach items="${applicationScope.sysParamMap.employee_shop}" var="sp">
				<option value="${sp.key}">${sp.value}</option>
			</c:forEach>
		</select>
		状态:
		<select id="estatus" class="easyui-combobox" id="estatus" name="employeeStatus" style="width:110px;">
			<c:forEach items="${applicationScope.sysParamMap.employee_status}" var="sp">
				<option value="${sp.key}">${sp.value}</option>
			</c:forEach>
		</select>
		<br/>

		姓名:<input id="ename" type="text" value="" name="employeeName" style="width:110px">
		登录账号(工号):<input id="eid" type="text" value="" name="usercode" style="width:110px">
		身份证号:<input id="enum" type="text" value="" name="employeeIdnum" style="width:110px">
		手机号:<input id="ephone" type="text" value="" name="employeePhone" style="width:110px">
		<input type="button" onclick="search()" value="查询">
	</form>

	<table id="dg"></table>

</body>
</html>